package cn.webrx;

public class Reg3 {
    public static void main(String[] args) {
        String name = "abc";
        String p = "...";
        System.out.println(name.matches(p));

        String phone = "13014577036"; //13000000000


        // \d 就代表 [0-9]
        String pattern = "1[3,5,8]\\d{9}"; //13xxx 15xxx 18xxx
        System.out.println(phone.trim().matches(pattern));


    }
    public static void str(String[] args) {
        String s = "hello\naa";
        System.out.println(s.lines().count());

        String ss = """
                aaa
                 bb
                   cccc
                demo
                """;
        System.out.println(ss.lines().count());
    }
}
